
package com.googlecode.cryptoid;

import android.app.TabActivity;
import android.content.Intent;
import android.content.res.Resources;
import android.os.Bundle;
import android.widget.TabHost;


public class ViewMessage extends TabActivity {
	public static boolean newMessage;
	static boolean needsCryption = false;
	static String raw = "";
	static String encrypted = "";
	
		public void onCreate(Bundle savedInstanceState) {
			super.onCreate(savedInstanceState);
			
		    setContentView(R.layout.message);

		    // Following code for tabs was implemented from an Android tutorial.
		    
		    Resources res = getResources(); // Resource object to get Drawables
		    TabHost tabHost = getTabHost();  // The activity TabHost
		    TabHost.TabSpec spec;  // Reusable TabSpec for each tab
		    Intent intent;  // Reusable Intent for each tab

		    intent = new Intent().setClass(this, RawMessage.class);
		    
		    // Initialize a TabSpec for each tab and add it to the TabHost
		    spec = tabHost.newTabSpec("raw message").setIndicator("Raw",
		                      res.getDrawable(R.drawable.ic_tab_raw))
		                  .setContent(intent);
		    tabHost.addTab(spec);

		    intent = new Intent().setClass(this, EncryptedMessage.class);
		    spec = tabHost.newTabSpec("encrypted message").setIndicator("Encrypted",
		                      res.getDrawable(R.drawable.ic_tab_encrypted))
		                  .setContent(intent);
		    tabHost.addTab(spec);

		    tabHost.setCurrentTab(2);
		    
		}
	
	
}
